ostree_admin_option_context_parse: explicitly clean up when exiting early
authorSimon McVittie <smcv@debian.org>
Sun, 30 Oct 2016 14:14:09 +0000 (14:14 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sun, 30 Oct 2016 21:37:38 +0000 (21:37 +0000)
commit4c32344b8e71e40034fcdbf3053f46c290fac785
treed5f7d0c66e43e38c403904479aa57841c50149cd
parent213d5013cec6abe61c3500c1bffceff1a42d5509
ostree_admin_option_context_parse: explicitly clean up when exiting early

The cleanup attribute doesn't clean up before calling a noreturn
function like exit(). Explicitly clean up the pointer variables
(but don't assume that a simple g_object_unref() would be OK either,
in case the behaviour of the cleanup attribute changes).

This isn't a real leak since we're about to exit anyway, but if we
don't fix it then valgrind memcheck will make the tests fail.

Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #559
Approved by: cgwalters
src/ostree/ot-main.c